export default function(target) {

    process.on('uncaughtException', (err) => {

        console.log(err);

        //log err
        fs.writeFileSync('./log/err.log', (new Date()).getTime() + err.stack + ' \n\n', { flag: 'a+' });

    });

    return target;
}